procedure TJQGMap3Frm.ElevationServiceOnCallbackEvent(Sender: TObject; AParams: TStringList);
var
  LContent: string;
  MyMarker: TIWCGJQGMap3Misc;
begin
  LContent:= AParams.Values['esResultText'];
  MyMarker:= TIWCGJQGMap3Misc.Create(Self);
  try
    MyMarker.Get.Tag:= 'MYELEVATIONTAG';
    MyMarker.Get.Name.Add('marker');
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.Anchor.Script:= Format('%s.gmap3(%s)',[IWCGJQGMap3.GetIDJQuery,MyMarker.JSon.AsJSon]);
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.Options.Content:= LContent;
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.ApplyProps;
  finally
    FreeAndNil(MyMarker);
  end;
end;

procedure TJQGMap3Frm.ElevationServiceOnDragEndEvent(Sender: TObject; AParams: TStringList);
begin  
  IWCGJQGMap3.JQGMapV3Options.ElevationService.LatLng.Func.Script:= IWCGJQGMap3.CurrEventParamsJs[0] + '.getPosition()';
  IWCGJQGMap3.JQGMapV3Options.ElevationService.OnCallback.OnEvent:= ElevationServiceOnCallbackEvent;
  IWCGJQGMap3.JQGMapV3Options.ElevationService.ApplyProps;
end;

begin
	IWCGJQGMap3.JQGMapV3Options.Map.Address:= 'Serra da Estrela, Portugal';
	IWCGJQGMap3.JQGMapV3Options.Map.Options.Zoom:= 10;
	IWCGJQGMap3.JQGMapV3Options.Marker.Address:= 'Serra da Estrela, Portugal';
	IWCGJQGMap3.JQGMapV3Options.Marker.Options.Draggable:= True;
	IWCGJQGMap3.JQGMapV3Options.Marker.Events.OnDragEnd.OnEvent:= ElevationServiceOnDragEndEvent;
	IWCGJQGMap3.JQGMapV3Options.Marker.Tag.Add('MYELEVATIONTAG');
end;
